package com.xxxx.seckill.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xxxx.seckill.pojo.Order;
import com.xxxx.seckill.pojo.User;
import com.xxxx.seckill.vo.GoodsVo;
import com.xxxx.seckill.vo.OrderDetailVo;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author heyanfeng
 * @since 2022-08-01
 */
public interface IOrderService extends IService<Order> {

    /**
     * @Author heyanfeng
     * @Description // 秒杀
     * @Date 11:35 2022/8/3
     * @Param [user, goods]
     * @return com.xxxx.seckill.pojo.Order
     **/
    Order seckill(User user, GoodsVo goods);

    /**
     * @Author heyanfeng
     * @Description // 订单详情
     * @Date 11:04 2022/8/26
     * @Param [orderId]
     * @return com.xxxx.seckill.vo.OrderDetailVo
     **/
    OrderDetailVo detail(Long orderId);

    /**
     * @Author heyanfeng
     * @Description
     * 功能描述:    创建秒杀地址
     * @Date 12:40 2022/9/1
     * @Param [user, goodsId]
     * @return java.lang.String
     **/
    String createPath(User user, Long goodsId);

    /**
     * @Author heyanfeng
     * @Description
     * 功能描述:  校验秒杀地址
     * @Date 14:43 2022/9/1
     * @Param [user, goodsId]
     * @return boolean
     **/
    boolean checkPath(User user, Long goodsId, String path);

    /**
     * @Author heyanfeng
     * @Description
     * 功能描述:   校验验证码
     * @Date 16:06 2022/9/1
     * @Param [user, goodsId, captcha]
     * @return boolean
     **/
    boolean checkCaptcha(User user, Long goodsId, String captcha);
}
